package com.cxq.ssm.dao.impl;

import java.sql.SQLException;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.cxq.ssm.dao.IUserDao;
import com.cxq.ssm.domain.User;
@Repository("userDao")
public class UserDaoImp  extends SqlSessionDaoSupport implements IUserDao{

	
	
	@Override
	public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
		super.setSqlSessionFactory(sqlSessionFactory);
	}
	public int userInsert(User user) throws SQLException {
		return getSqlSession().insert(User.class.getName()+".userInsert", user);
	}

	public User userFind(User user) throws SQLException {
		User userlogin = getSqlSession().selectOne(User.class.getName()+".userSelect", user);
		
		return null;
	}

}
